HAL USART state and error functions migration ¶
This section provides information about the HAL USART state and error functions migration.
HAL_USRT_GetState ¶
The function
HAL_USART_GetState()
remain unchanged.
|
HAL1 |
HAL2 |
|---|---|
HAL_USART_GetState(USART_HandleTypeDef *husart)
|
HAL_USART_GetState(const hal_usart_handle_t *husart)
|
Related concepts: Revised and optimized HAL state machine
HAL_USART_GetError ¶
|
HAL1 |
HAL2 |
|
|---|---|---|
|
Description |
In HAL1, the function
|
In HAL2, the function
|
|
Function name |
HAL_USART_GetError(USART_HandleTypeDef *husart);
|
HAL_USART_GetLastErrorCodes(const hal_usart_handle_t *husart);
|
Note
In HAL2, the constant
HAL_USART_ERROR_INVALID_CALLBACK
has been removed. Instead, functions
HAL_USART_RegisterXXXCallback()
return
HAL_INVALID_PARAM
in case of an invalid callback pointer.
Related concepts: Revised and optimized HAL error management.